package com.sm.honkon.app

import androidx.multidex.MultiDex
import com.tencent.mmkv.MMKV
import me.hgj.jetpackmvvm.base.BaseApp

/**
 * 作者　: hegaojian
 * 时间　: 2019/12/23
 * 描述　:
 */

class App : BaseApp() {

    companion object {
        lateinit var instance: App
        val database: AppDatabase by lazy {
            AppDatabase.getInstance(instance)
        }
    }

    override fun onCreate() {
        super.onCreate()
        instance = this
        MultiDex.install(this)
        MMKV.initialize(this.filesDir.absolutePath + "/mmkv")
        CrashHandler.getInstance().init(this)
    }

}
